<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
      <script>
          var h,he,b;
         for( h=0;h<=31;h++)
         {
             b = 25-h;
             he = 28-h;
             if((b+he)==31)
             {
                 alert(h)
                 alert(b)
                 alert(he)
             }
         }
      </script>
</body>
</html>